package com.example.demo.niuke;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.TreeSet;

/**
 * @Description:
 * @Author: LLL
 * @Date: 2020-03-18 22:59
 **/
public class Main9 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        int n = Integer.parseInt(s);
        TreeSet<String> set = new TreeSet<>();
        for (int i = 1; i <= n; i++) {
            String s1 = br.readLine();
            set.add(s1);
        }
        set.forEach(System.out::println);

    }
}
